import {
	ORDINARY_CODE,
	COMPLEX_CODE
} from 'src/pages/AnalyseManage/EditReport/components/EditorDataType/EnumConfig';

export const defaultStyles = {
	'SimpleTable': {
		titleValue: '表格',
		tablePaddingTopBottom: 8,
		tablePaddingLeftRight: 10,
		tableHeadFontSize: 14,
		tableBodyFontSize: 14,
		tilteHight: 40,
		containerWidth: 18,
		containerHeight: 19,
	},
	'CrossTable': {
		titleValue: '交叉透视表',
		tablePaddingTopBottom: 8,
		tablePaddingLeftRight: 10,
		tableHeadFontSize: 14,
		tableBodyFontSize: 14,
		tilteHight: 40,
		containerWidth: 34,
		containerHeight: 19,
	},
	'Liquid': {
		titleValue: '水波图',
		labelFontColor: '#999',
		labelFontSize: 15,
	},
	'Quota': {
		titleValue: '核心指标图',
		labelFontSize: 15,
		labelFontColor: '#999',
		valueFontSize: 32,
		valueFontColor: '#0CCC98'
	},
	'Pie': {
		titleValue: '饼图',
		isShowLegend: true,
		legendPosition: 'right',
		legendFontColor: '#999',
		legendFontSize: 15,
		labelContentType: [ 'item', 'percent' ],
		labelPosition: 'spider',
		isShowLabel: true
	},
	'Circle': {
		titleValue: '环图',
		isShowLabel: false,
		isShowLegend: true,
		legendPosition: 'bottom',
		legendFontColor: '#999',
		legendFontSize: 15,
	},
	'Gauge': {
		titleValue: '仪表盘图',
		labelFontColor: '#999',
		labelFontSize: 15,
		valueFontColor: '#31D4A8',
		valueFontSize: 32,
	},
	'Text': {
		titleValue: '文本框',
		contentFontSize: 14,
	},
	'SingleChoice': {
		titleValue: '单选',
		showTypeSingle: 'FilterSingle',
		filterColorTheme: 'light'
	},
	'MultipleChoice': {
		titleValue: '多选',
		showTypeMul: 'FilterMul',
		filterColorTheme: 'light'
	},
	'DataRange': {
		titleValue: '数据范围',
		rangeSelect: [ 20, 30 ]
	},
	'DatePicker': {
		titleValue: '日期',
		datePicker: '2020/01/01',
		filterColorTheme: 'light'
	},
	'DateRangePicker': {
		titleValue: '日期范围',
		dateRangePicker: [],
		filterColorTheme: 'light'
	},
	'Line': {
		titleValue: '折线图',
		isShowLegend: true,
		legendFontColor: '#999',
		legendFontSize: 15,
		legendPosition: 'bottom',
		isShowXLine: true,
		isShowYLine: true,
		isShowToolTip: true,
		chartTopPadding: 30,
		chartRightPadding: 10,
		chartLeftPadding: 10,
		chartBottomPadding: 10,
		chartLabelMarkColor: '#86bc25'
	},
	'DoubleYLine': {
		titleValue: '双Y折线图',
		isShowLegend: true,
		legendFontColor: '#999',
		legendFontSize: 15,
		legendPosition: 'bottom',
		isShowToolTip: true,
		isShowDXLine: true,
		isShowLYLine: true,
		isShowRYLine: true,
		chartTopPadding: 30,
		chartRightPadding: 10,
		chartLeftPadding: 10,
		chartBottomPadding: 10,
		chartLabelMarkColor: '#86bc25'
	},
	'Column': {
		titleValue: '柱状图',
		isShowLegend: true,
		legendFontColor: '#999',
		legendFontSize: 15,
		legendPosition: 'bottom',
		isShowToolTip: true,
		isShowXLine: true,
		chartTopPadding: 30,
		chartRightPadding: 10,
		chartLeftPadding: 10,
		chartBottomPadding: 10,
	},
	'Column_bar': {
		titleValue: '条形图',
		isShowLegend: true,
		legendFontColor: '#999',
		legendFontSize: 15,
		legendPosition: 'bottom',
		isShowToolTip: true,
		isShowXLine: true,
		isHiddenYGridLine: true,
		chartTopPadding: 30,
		chartRightPadding: 10,
		chartLeftPadding: 10,
		chartBottomPadding: 10,
	},
	'ColumnLine': {
		titleValue: '柱线组合图',
		isShowLegend: true,
		legendFontColor: '#999',
		legendFontSize: 15,
		legendPosition: 'bottom',
		isShowToolTip: true,
		isShowXLine: true,
		chartTopPadding: 30,
		chartRightPadding: 10,
		chartLeftPadding: 10,
		chartBottomPadding: 10,
		showArea: [ 'column', 'line' ]
	},
	'StackedColumn': {
		titleValue: '堆叠柱状图',
		isShowLegend: true,
		legendFontColor: '#999',
		legendFontSize: 15,
		legendPosition: 'bottom',
		isShowToolTip: true,
		isShowXLine: true,
		// isShowLabelData: true,
		chartTopPadding: 30,
		chartRightPadding: 10,
		chartLeftPadding: 10,
		chartBottomPadding: 10,
	},
	'StackedColumn_bar': {
		titleValue: '堆叠条形图',
		isShowLegend: true,
		legendFontColor: '#999',
		legendFontSize: 15,
		legendPosition: 'bottom',
		isShowToolTip: true,
		isShowXLine: true,
		isHiddenYGridLine: true,
		// isShowLabelData: true,
		chartTopPadding: 30,
		chartRightPadding: 10,
		chartLeftPadding: 10,
		chartBottomPadding: 10,
	},
	'WordCloud': {
		titleValue: '词云图',
	},
	'Scatter': {
		titleValue: '散点图',
		isShowLegend: true,
		legendFontColor: '#999',
		legendFontSize: 15,
		isShowXLine: true,
		legendPosition: 'bottom',
		isShowYLine: true,
		isShowToolTip: true,
		chartLineColor: '#eee',
		chartGridlineColor: '#eee',
		chartTopPadding: 20,
		chartRightPadding: 10,
		chartBottomPadding: 10,
		chartLeftPadding: 20,
	},
	'RadarChart': {
		titleValue: '雷达图',
		// isShowLegend: true,
		// legendPosition: 'bottom',
		isShowToolTip: true,
		isShowLabelData: false,
	},
	'Area': {
		titleValue: '面积图',
		isShowLegend: true,
		legendFontColor: '#999',
		legendFontSize: 15,
		legendPosition: 'bottom',
		isShowXLine: true,
		isShowYLine: true,
		isShowToolTip: true,
		chartTopPadding: 30,
		chartRightPadding: 10,
		chartLeftPadding: 10,
		chartBottomPadding: 10,
		chartLabelMarkColor: '#86bc25'
	},
	'MapFill': {
		titleValue: '中国省份地图',
		// isMapLabelShow: true,
	},
	'MapBubble': {
		titleValue: '中国省份气泡图',
		// isMapLabelShow: true,
	},
	'Bullet': {
		titleValue: '子弹图',
		// isShowLegend: true,
		// legendPosition: 'bottom',
		isShowToolTip: true,
		chartLeftPadding: 30,
		chartRightPadding: 10,
		chartBottomPadding: 50,
		isShowLabelData: true,
		isShowLabelText: true,
		labelFontColor: '#fff',
		labelFontSize: 12,
	},
	'Image': {
		titleValue: '图片',
	},
};

export const TABLE_MENU = [
	{
		key: 'simpleTable',
		name: '普通表格',
		icon: require( 'src/assets/img/putongbiaoge.jpg' ),
		type: 'SimpleTable'
	},
	{
		key: 'crossTable',
		name: '交叉透视表',
		icon: require( 'src/assets/img/jiaochatoushi.jpg' ),
		type: 'CrossTable'
	}
];

export const FILTER_MENU = [
	{
		key: 'singlechoice',
		name: '单选',
		icon: require( 'src/assets/img/guolvdanxuan.jpg' ),
		type: 'SingleChoice'
	},
	{
		key: 'multiplechoice',
		name: '多选',
		icon: require( 'src/assets/img/guolvduoxuan.jpg' ),
		type: 'MultipleChoice'
	},
	// {
	// 	key: 'datarange',
	// 	name: '数据范围',
	// 	icon: require( 'src/assets/img/guolvshujufanwei.jpg' ),
	// 	type: 'DataRange'
	// },
	{
		key: 'datepicker',
		name: '日期',
		icon: require( 'src/assets/img/guolvriqi.jpg' ),
		type: 'DatePicker'
	},
	{
		key: 'daterangepicker',
		name: '日期范围',
		icon: require( 'src/assets/img/guolvriqifanwei.jpg' ),
		type: 'DateRangePicker'
	},
];

export const PIE_MENU = [
	{
		key: 'pie',
		name: '饼图',
		icon: require( 'src/assets/img/bingtu.jpg' ),
		type: 'Pie'
	},
	{
		key: 'circle',
		name: '环图',
		icon: require( 'src/assets/img/huantu.jpg' ),
		type: 'Circle'
	},
	{
		key: 'scatter',
		name: '散点图',
		icon: require( 'src/assets/img/sandiantu.jpg' ),
		type: 'Scatter'
	},
	{
		key: 'radarchart',
		name: '雷达图',
		icon: require( 'src/assets/img/leidatu.jpg' ),
		type: 'RadarChart'
	},
	{
		key: 'wordCloud',
		name: '词云图',
		icon: require( 'src/assets/img/ciyuntu.jpg' ),
		type: 'WordCloud'
	}
];

export const QUOTA_MENU = [
	{
		key: 'gauge',
		name: '仪表盘',
		icon: require( 'src/assets/img/yibiaopan.jpg' ),
		type: 'Gauge'
	},
	{
		key: 'liquid',
		name: '水波图',
		icon: require( 'src/assets/img/shuibo.jpg' ),
		type: 'Liquid'
	},
	{
		key: 'quota',
		name: '核心指标图',
		icon: require( 'src/assets/img/hexinzhibiao.jpg' ),
		type: 'Quota'
	},
	{
		key: 'bullet',
		name: '子弹图',
		icon: require( 'src/assets/img/zidan.jpg' ),
		type: 'Bullet'
	}
];

export const LINE_COLUMN_MENU = [
	{
		key: 'line',
		name: '折线图',
		icon: require( 'src/assets/img/zhexian.jpg' ),
		type: 'Line'
	},
	{
		key: 'DoubleYLine',
		name: '双Y折线图',
		icon: require( 'src/assets/img/shuangY.jpg' ),
		type: 'DoubleYLine'
	},
	{
		key: 'column',
		name: '柱状图',
		icon: require( 'src/assets/img/zhuzhuang.jpg' ),
		type: 'Column'
	},
	{
		key: 'columnbar',
		name: '条形图',
		icon: require( 'src/assets/img/tiaoxing.jpg' ),
		type: 'Column_bar'
	},
	{
		key: 'columnline',
		name: '柱线组合图',
		icon: require( 'src/assets/img/zhuxianzuhe.jpg' ),
		type: 'ColumnLine'
	},
	{
		key: 'stackedcolumn',
		name: '堆叠柱状图',
		icon: require( 'src/assets/img/duidiezhuzhuang.jpg' ),
		type: 'StackedColumn'
	},
	{
		key: 'stackedcolumnbar',
		name: '堆叠条形图',
		icon: require( 'src/assets/img/duidietiaoxing.jpg' ),
		type: 'StackedColumn_bar'
	},
	{
		key: 'area',
		name: '面积图',
		icon: require( 'src/assets/img/mianjitu.jpg' ),
		type: 'Area'
	},
];

export const MAP_MENU = [ {
	key: 'mapfill',
	name: '填充地图',
	icon: require( 'src/assets/img/tianchong.jpg' ),
	type: 'MapFill'
}, {
	key: 'mapbubble',
	name: '符号地图',
	icon: require( 'src/assets/img/fuhaoditu.jpg' ),
	type: 'MapBubble'
} ];

export const OTHER_MENU = [ {
	key: 'text',
	name: '文本',
	icon: require( 'src/assets/img/wenbenkuang.jpg' ),
	type: 'Text'
}, {
	key: 'image',
	name: '图片',
	icon: require( 'src/assets/img/pic.jpg' ),
	type: 'Image'
} ];

export const defaultDataConfigs = {
	'SimpleTable': {
		tableType: ORDINARY_CODE,
		openAggregation: true,
		isOpenPage: true,
	},
	'CrossTable': {
		tableType: COMPLEX_CODE,
		openAggregation: true,
		isOpenPage: true,
	},
	'Circle': {
		pieType: 'circle'
	},
	'Column': {
		columnType: 'column'
	},
	//条形图
	'Column_bar': {
		columnType: 'bar'
	},
	'ColumnLine': {
		columnType: 'doubleY'
	},
	'StackedColumn': {
		columnType: 'stackedColumn'
	},
	//堆叠条形图
	'StackedColumn_bar': {
		columnType: 'stackedBar'
	},
	'Line': {
		lineType: 'basic',
	},
	'DoubleYLine': {
		lineType: 'basic'
	},
	'WordCloud': {
		wordCloudType: 'basic'
	},
	'Scatter': {
		scatterType: 'basic'
	},
	'MapFill': {
		mapType: 'china',
	},
	'MapBubble': {
		mapType: 'china',
	},
	'Bullet': {
		bulletType: 'horizontal'
	},
};

export const default_tableName = 'ORDERS_USCA_BI';

export const filterTypes = [ 'FilterSingle', 'FilterMul', 'SelectSingle', 'SelectMul' ];
